<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>鑫立方管理系统</title>
<link rel="stylesheet" type="text/css" href="<%=basePath%>css/common.css" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>css/main.css" />
<script type="text/javascript" src="<%=basePath%>js/libs/modernizr.min.js"></script>

<script src="<%=basePath%>js/jquery-1.10.2.min.js"></script>
</head>
<body>
  <div class="topbar-wrap white">
    <div class="topbar-inner clearfix">
      <div class="topbar-logo-wrap clearfix">
        <ul class="navbar-list clearfix">
          <li><a class="on" href="#">鑫立方管理系统</a>
          </li>
        </ul>
      </div>
      <div class="top-info-wrap">
        <ul class="top-info-list clearfix">
          <li><a href="/user/logout">退出</a>
          </li>
        </ul>
      </div>
    </div>
  </div>
  <div class="container clearfix">
    <div class="sidebar-wrap">
      <div class="sidebar-content">
        <ul class="sidebar-list">
          <li><a href="#"><i class="icon-font">&#xe003;</i>主材部</a>
            <ul class="sub-menu">
             <li><a href="<%=basePath + "product/index"%>"><i class="icon-font">&#xe008;</i>商品管理</a>
              </li>
              <li><a href="<%=basePath + "factory/product"%>"><i class="icon-font">&#xe006;</i>厂家管理</a></li>
              <li><a href="<%=basePath + "order/index"%>"><i class="icon-font">&#xe005;</i>订单管理</a>
              </li>
              <c:if test="${sessionScope.xlf_userType == '10' }">
              <li><a href="<%=basePath + "user/index"%>"><i class="icon-font">&#xe009;</i>管理员管理</a>
              </li>
              </c:if>
              <li><a href="<%=basePath + "product/mail"%>"><i class="icon-font">&#xe004;</i>邮件配置</a>
              </li>
               <li><a href="<%=basePath + "email/index"%>"><i class="icon-font">&#xe012;</i>邮件记录</a>
              </li>
            </ul>
          </li>
        </ul>
      </div>
    </div>
    <!--/sidebar-->
    <div class="main-wrap">

      <div class="crumb-wrap">
        <div class="crumb-list">
          <i class="icon-font"></i><a href="/user/index">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">管理员管理</span>
        </div>
      </div>
      <div class="result-wrap">
        <form action="/user/save" method="post">
          <table class="insert-tab" width="100%">
            <tbody>
              <input type="hidden" name="user.u_id" value="${user.u_id }" />
              <tr>
                <th><i class="require-red">*</i>管理员姓名：</th>
                <td><input class="common-text required" name="user.name" value="${user.name}" size="50" type="text">
                </td>
              </tr>
              <tr>
                <th><i class="require-red">*</i>登陆账号：</th>
                <td><input class="common-text required" name="user.username" value="${user.username}" size="50" type="text"></td>
              </tr>
              <tr>
                <th><i class="require-red">*</i>登陆密码：</th>
                <td><input class="common-text required" name="user.password" value="${user.password}" size="50" type="text">
                </td>
              </tr>
              <tr>
                <th><i class="require-red">*</i>管理员类型：</th>
                <td>
                  <select name="user.type">
                    <c:forEach items="${roleList }" var="option" varStatus="s">
                      <c:if test="${user.type == option.id }">
                        <option value="${option.id }" selected="selected">${option.name }</option>
                      </c:if>
                      <c:if test="${user.type != option.id }">
                        <option value="${option.id }">${option.name }</option>
                      </c:if>
                    </c:forEach>
                  </select>
                </td>
              </tr>
              <tr>
                <th><i class="require-red">*</i>联系电话：</th>
                <td><input class="common-text required" name="user.tel" value="${user.tel}" size="50" type="text"></td>
              </tr>
              <tr>
                <th></th>
                <td><input class="btn btn-primary btn6 mr10" value="提交" type="submit"> <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button">
                </td>
              </tr>
            </tbody>
          </table>
        </form>
      </div>
    </div>
    <!--/main-->
  </div>
</body>
</html>